	
 
 
 cd  "/Users/eliemurard/Dropbox/Household dissolution and migrants' education/files for replication/"
 
 
 
**********************************************************************************	
*	Figure A.1 in Appendix
**********************************************************************************
	
	
	 use ACS_Mex_men.dta,clear 
	 
	 
	 g  semean = spousemex  
	collapse (mean)  spousemex    (semean)  semean    , by(  yrsusa1  ) 
	g upper =  spousemex   +1.96*semean 
	g lower =  spousemex    -1.96*semean 

	twoway ( rarea upper   lower  yrsusa1  ,  color(gs13) ) || /// 
		    (line     spousemex     yrsusa1  ,  color(blue) )  ///
			, title( "Mexican men in the U.S."   "married in Mexico before migrating" ) ///
			ytitle(Living with Mexican wife) note(Data source: ACS 2008-2019 ) legend(off) note("sample: 25-64 Mexborn men married before migration," "either married to a coresiding Mex wife or an not-coresiding wife or separated ")  ylabel(0.25(0.05)0.65)

**********************************************************************************	
*	Figure A.2 in Appendix
**********************************************************************************
	
			
	use ACS_Mex_women.dta,clear 
	
	g  semean= coresid_child_ACS 
	
	collapse (mean) coresid_child_ACS  (semean)  semean  , by(  age ) 
	
	g upper = coresid_child_ACS   +1.96*semean
	g lower = coresid_child_ACS   -1.96*semean  
	
	merge 1:1 age   using  Mexcensus_average_byage 
	drop if _m==2
	drop _m 
			
	twoway ( rarea   upper  lower    age    ,  color(gs13) ) || /// 
		    (line  coresid_child_ACS     age  ,  color(blue) lpattern(line) ) ///
		    (line coresid_child_Mexcensus   age  ,  color(red) lpattern(dash) ) ///
			, title( "Mexican wife living with Mex husband in the U.S." )  xtitle("Age") ///
			ytitle(Share with Mex children home ) note( "Women in US since less than 5 years ago. Both partners marrried before migrating." ///
			"Data source: ACS  (10,692 obs) and 2010 Mexican census (>2M obs)"  )  ///
			legend(order(2 "Wife in US (ACS)" 3 "Wife in Mexico (Mex Census)" )) ylabel(0(0.1)1) xlabel(20(5)50)
	
	
	
	
	
